/*
 * Copyright (c) 2023 vitasystems GmbH
 *
 * This file is part of project EHRbase Migration Tool
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.ehrbase.migration.exporter.v0.jooq.pg.tables.records;

import java.util.UUID;
import org.ehrbase.migration.exporter.v0.jooq.pg.enums.PartyRefIdType;
import org.ehrbase.migration.exporter.v0.jooq.pg.enums.PartyType;
import org.ehrbase.migration.exporter.v0.jooq.pg.tables.PartyIdentified;
import org.ehrbase.migration.exporter.v0.jooq.pg.udt.records.DvCodedTextRecord;
import org.jooq.Field;
import org.jooq.Record10;
import org.jooq.Record2;
import org.jooq.Row10;
import org.jooq.impl.UpdatableRecordImpl;

/**
 * This class is generated by jOOQ.
 */
@SuppressWarnings({"all", "unchecked", "rawtypes"})
public class PartyIdentifiedRecord extends UpdatableRecordImpl<PartyIdentifiedRecord>
        implements Record10<
                UUID, String, String, String, String, String, PartyType, DvCodedTextRecord, PartyRefIdType, Short> {

    private static final long serialVersionUID = 1L;

    /**
     * Setter for <code>ehr.party_identified.id</code>.
     */
    public void setId(UUID value) {
        set(0, value);
    }

    /**
     * Getter for <code>ehr.party_identified.id</code>.
     */
    public UUID getId() {
        return (UUID) get(0);
    }

    /**
     * Setter for <code>ehr.party_identified.name</code>.
     */
    public void setName(String value) {
        set(1, value);
    }

    /**
     * Getter for <code>ehr.party_identified.name</code>.
     */
    public String getName() {
        return (String) get(1);
    }

    /**
     * Setter for <code>ehr.party_identified.party_ref_value</code>.
     */
    public void setPartyRefValue(String value) {
        set(2, value);
    }

    /**
     * Getter for <code>ehr.party_identified.party_ref_value</code>.
     */
    public String getPartyRefValue() {
        return (String) get(2);
    }

    /**
     * Setter for <code>ehr.party_identified.party_ref_scheme</code>.
     */
    public void setPartyRefScheme(String value) {
        set(3, value);
    }

    /**
     * Getter for <code>ehr.party_identified.party_ref_scheme</code>.
     */
    public String getPartyRefScheme() {
        return (String) get(3);
    }

    /**
     * Setter for <code>ehr.party_identified.party_ref_namespace</code>.
     */
    public void setPartyRefNamespace(String value) {
        set(4, value);
    }

    /**
     * Getter for <code>ehr.party_identified.party_ref_namespace</code>.
     */
    public String getPartyRefNamespace() {
        return (String) get(4);
    }

    /**
     * Setter for <code>ehr.party_identified.party_ref_type</code>.
     */
    public void setPartyRefType(String value) {
        set(5, value);
    }

    /**
     * Getter for <code>ehr.party_identified.party_ref_type</code>.
     */
    public String getPartyRefType() {
        return (String) get(5);
    }

    /**
     * Setter for <code>ehr.party_identified.party_type</code>.
     */
    public void setPartyType(PartyType value) {
        set(6, value);
    }

    /**
     * Getter for <code>ehr.party_identified.party_type</code>.
     */
    public PartyType getPartyType() {
        return (PartyType) get(6);
    }

    /**
     * Setter for <code>ehr.party_identified.relationship</code>.
     */
    public void setRelationship(DvCodedTextRecord value) {
        set(7, value);
    }

    /**
     * Getter for <code>ehr.party_identified.relationship</code>.
     */
    public DvCodedTextRecord getRelationship() {
        return (DvCodedTextRecord) get(7);
    }

    /**
     * Setter for <code>ehr.party_identified.object_id_type</code>.
     */
    public void setObjectIdType(PartyRefIdType value) {
        set(8, value);
    }

    /**
     * Getter for <code>ehr.party_identified.object_id_type</code>.
     */
    public PartyRefIdType getObjectIdType() {
        return (PartyRefIdType) get(8);
    }

    /**
     * Setter for <code>ehr.party_identified.sys_tenant</code>.
     */
    public void setSysTenant(Short value) {
        set(9, value);
    }

    /**
     * Getter for <code>ehr.party_identified.sys_tenant</code>.
     */
    public Short getSysTenant() {
        return (Short) get(9);
    }

    // -------------------------------------------------------------------------
    // Primary key information
    // -------------------------------------------------------------------------

    @Override
    public Record2<UUID, Short> key() {
        return (Record2) super.key();
    }

    // -------------------------------------------------------------------------
    // Record10 type implementation
    // -------------------------------------------------------------------------

    @Override
    public Row10<UUID, String, String, String, String, String, PartyType, DvCodedTextRecord, PartyRefIdType, Short>
            fieldsRow() {
        return (Row10) super.fieldsRow();
    }

    @Override
    public Row10<UUID, String, String, String, String, String, PartyType, DvCodedTextRecord, PartyRefIdType, Short>
            valuesRow() {
        return (Row10) super.valuesRow();
    }

    @Override
    public Field<UUID> field1() {
        return PartyIdentified.PARTY_IDENTIFIED.ID;
    }

    @Override
    public Field<String> field2() {
        return PartyIdentified.PARTY_IDENTIFIED.NAME;
    }

    @Override
    public Field<String> field3() {
        return PartyIdentified.PARTY_IDENTIFIED.PARTY_REF_VALUE;
    }

    @Override
    public Field<String> field4() {
        return PartyIdentified.PARTY_IDENTIFIED.PARTY_REF_SCHEME;
    }

    @Override
    public Field<String> field5() {
        return PartyIdentified.PARTY_IDENTIFIED.PARTY_REF_NAMESPACE;
    }

    @Override
    public Field<String> field6() {
        return PartyIdentified.PARTY_IDENTIFIED.PARTY_REF_TYPE;
    }

    @Override
    public Field<PartyType> field7() {
        return PartyIdentified.PARTY_IDENTIFIED.PARTY_TYPE;
    }

    @Override
    public Field<DvCodedTextRecord> field8() {
        return PartyIdentified.PARTY_IDENTIFIED.RELATIONSHIP;
    }

    @Override
    public Field<PartyRefIdType> field9() {
        return PartyIdentified.PARTY_IDENTIFIED.OBJECT_ID_TYPE;
    }

    @Override
    public Field<Short> field10() {
        return PartyIdentified.PARTY_IDENTIFIED.SYS_TENANT;
    }

    @Override
    public UUID component1() {
        return getId();
    }

    @Override
    public String component2() {
        return getName();
    }

    @Override
    public String component3() {
        return getPartyRefValue();
    }

    @Override
    public String component4() {
        return getPartyRefScheme();
    }

    @Override
    public String component5() {
        return getPartyRefNamespace();
    }

    @Override
    public String component6() {
        return getPartyRefType();
    }

    @Override
    public PartyType component7() {
        return getPartyType();
    }

    @Override
    public DvCodedTextRecord component8() {
        return getRelationship();
    }

    @Override
    public PartyRefIdType component9() {
        return getObjectIdType();
    }

    @Override
    public Short component10() {
        return getSysTenant();
    }

    @Override
    public UUID value1() {
        return getId();
    }

    @Override
    public String value2() {
        return getName();
    }

    @Override
    public String value3() {
        return getPartyRefValue();
    }

    @Override
    public String value4() {
        return getPartyRefScheme();
    }

    @Override
    public String value5() {
        return getPartyRefNamespace();
    }

    @Override
    public String value6() {
        return getPartyRefType();
    }

    @Override
    public PartyType value7() {
        return getPartyType();
    }

    @Override
    public DvCodedTextRecord value8() {
        return getRelationship();
    }

    @Override
    public PartyRefIdType value9() {
        return getObjectIdType();
    }

    @Override
    public Short value10() {
        return getSysTenant();
    }

    @Override
    public PartyIdentifiedRecord value1(UUID value) {
        setId(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value2(String value) {
        setName(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value3(String value) {
        setPartyRefValue(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value4(String value) {
        setPartyRefScheme(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value5(String value) {
        setPartyRefNamespace(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value6(String value) {
        setPartyRefType(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value7(PartyType value) {
        setPartyType(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value8(DvCodedTextRecord value) {
        setRelationship(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value9(PartyRefIdType value) {
        setObjectIdType(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord value10(Short value) {
        setSysTenant(value);
        return this;
    }

    @Override
    public PartyIdentifiedRecord values(
            UUID value1,
            String value2,
            String value3,
            String value4,
            String value5,
            String value6,
            PartyType value7,
            DvCodedTextRecord value8,
            PartyRefIdType value9,
            Short value10) {
        value1(value1);
        value2(value2);
        value3(value3);
        value4(value4);
        value5(value5);
        value6(value6);
        value7(value7);
        value8(value8);
        value9(value9);
        value10(value10);
        return this;
    }

    // -------------------------------------------------------------------------
    // Constructors
    // -------------------------------------------------------------------------

    /**
     * Create a detached PartyIdentifiedRecord
     */
    public PartyIdentifiedRecord() {
        super(PartyIdentified.PARTY_IDENTIFIED);
    }

    /**
     * Create a detached, initialised PartyIdentifiedRecord
     */
    public PartyIdentifiedRecord(
            UUID id,
            String name,
            String partyRefValue,
            String partyRefScheme,
            String partyRefNamespace,
            String partyRefType,
            PartyType partyType,
            DvCodedTextRecord relationship,
            PartyRefIdType objectIdType,
            Short sysTenant) {
        super(PartyIdentified.PARTY_IDENTIFIED);

        setId(id);
        setName(name);
        setPartyRefValue(partyRefValue);
        setPartyRefScheme(partyRefScheme);
        setPartyRefNamespace(partyRefNamespace);
        setPartyRefType(partyRefType);
        setPartyType(partyType);
        setRelationship(relationship);
        setObjectIdType(objectIdType);
        setSysTenant(sysTenant);
        resetChangedOnNotNull();
    }
}
